GdkDeviceTool *
gdk_seat_get_tool (GdkSeat *seat,
- guint64 serial)
+ guint64 serial,
+ guint64 hw_id)
{
GdkSeatClass *seat_class;
g_return_val_if_fail (GDK_IS_SEAT (seat), NULL);
seat_class = GDK_SEAT_GET_CLASS (seat);
- return seat_class->get_tool (seat, serial);
+ return seat_class->get_tool (seat, serial, hw_id);
}
/**
static GdkDeviceTool *
gdk_seat_default_get_tool (GdkSeat *seat,
- guint64 serial)
+ guint64 serial,
+ guint64 hw_id)
{
GdkSeatDefaultPrivate *priv;
GdkDeviceTool *tool;
{
tool = g_ptr_array_index (priv->tools, i);
- if (tool->serial == serial)
+ if (tool->serial == serial && tool->hw_id == hw_id)
return tool;
}
priv = gdk_seat_default_get_instance_private (seat);
- if (tool != gdk_seat_get_tool (GDK_SEAT (seat),
- gdk_device_tool_get_serial (tool)))
+ if (tool != gdk_seat_get_tool (GDK_SEAT (seat), tool->serial, tool->hw_id))
return;
g_signal_emit_by_name (seat, "tool-removed", tool);
GdkSeatCapabilities capabilities);
GdkDeviceTool * (* get_tool) (GdkSeat *seat,
- guint64 serial);
+ guint64 serial,
+ guint64 tool_id);
GList * (* get_master_pointers) (GdkSeat *seat,
GdkSeatCapabilities capabilities);
};
GdkDeviceTool *
gdk_seat_get_tool (GdkSeat *seat,
- guint64 serial);
+ guint64 serial,
+ guint64 hw_id);
#endif /* __GDK_SEAT_PRIVATE_H__ */
device_get_tool_serial_and_id (device, &serial_id, &tool_id))
{
seat = gdk_device_get_seat (device);
- tool = gdk_seat_get_tool (seat, serial_id);
+ tool = gdk_seat_get_tool (seat, serial_id, tool_id);
if (!tool && serial_id > 0)
{